<template>
  <div v-for="(item, index) in book" :key="index">{{ item }}</div>
</template>

<script lang="ts">
import { defineComponent, PropType, toRefs } from "vue";

type Book = {
  title: String;
  author: String;
  year: String;
};

export default defineComponent({
  props: {
    book: {
      type: Object as PropType<Book[]>,
      required: true,
    },
  },

  setup(props, ctx) {
    // console.log(props.book.title)
    const { book } = props;
    console.log(book);
  },
});
</script>